Skip to main content

direct path write temp

Short Description

When a process is writing buffers directly from PGA (as opposed to the DBWR writing them from the buffer cache), the process waits on this event for the write call to complete.

Detailed Description​

You will see direct path write temp waits when:

  • Sorts are too large for memory and are being written to disk.
  • When parallel execution servers are scanning for data including Parallel Create Table As Select
  • Direct-path INSERTs.
  • Some LOB operations.
  • When the server process is processing buffers faster than the I/O system can return them.

Your process writes data from disk directly from your process's private memory - the Program Global Area (PGA) rather than the shared memory normally associated with database writes. Asynchronous I/O will be used if possible.

Like direct path reads, the number of waits is not the same as number of write calls issued if the I/O subsystem supports asynchronous writes. The session waits if it has processed all buffers in the PGA and cannot continue work until an I/O request completes.

How to reduce this wait​

Use the tuning script from oracle-base.com and look in the 'Disk Sorts' section to see if you have excessive sorts to disk occurring. Tune the SQL to reduce sorting, and consider adjusting the PGA_AGGREGATE_SIZE parameter to allow more sorting in memory.

If you have a decision support system running parallel queries, this will be the mechanism used to return data.

Oracle Performance Tuning Guide - direct path write and direct path write

Tuning script from oracle-base.com

Oracle Reference - PGA_AGGREGATE_TARGET

Search online​

If this article doesn't have the information you need you can try searching online. Remember, you can contribute suggestions to this page.